﻿using Domain.Entitys;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EFCore.Configers
{
    public class CPCConfigerss : IEntityTypeConfiguration<CPC>
    {
        /// <summary>
        /// 公共字段设置表
        /// </summary>
        /// <param name="builder"></param>
        public void Configure(EntityTypeBuilder<CPC> builder)
        {
            
            builder.ToTable(nameof(CPC));
            builder.HasKey(c=>c.PbcId);
            builder.Property(c => c.AttributeKind).IsRequired(false).HasMaxLength(50);
            builder.Property(c => c.AttributeName).IsRequired(false).HasMaxLength(50);
        }
    }
}
